
import Vue from 'vue';
import App from './App';
import router from './router/index.js'; // vue-router
import store from './store/index.js'; // vuex
import gAxios from './public/server'; // axios 封装对象
import publicComponents from './components/importComponents.js'; // 导入项目自定义组件
import vuescroll from 'vuescroll'; // 滚动条插件
import libs from '@/lib/lib.js'; // 工具库
import apiList from './api/importApi.js'; // 接口定义
import 'bpmn-js/dist/assets/diagram-js.css' // 左边工具栏以及编辑节点的样式
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css'
import 'bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css'
import 'bpmn-js-properties-panel/dist/assets/bpmn-js-properties-panel.css' // 右边工具栏样式

// vuescroll 全局配置
const vscr = {
  hasParams: true,
  value: vuescroll,
  params: {
    ops: {
      bar: {
        keepShow: true,
        background: '#999',
        opacity: 0.6,
      }
    },
    name: 'vscr'
  }
};

// 集中导入组件
const components = [
  libs,
  apiList,
  publicComponents,
  vscr,
];

components.forEach(v => v.hasParams ? Vue.use(v.value, v.params) : Vue.use(v));

Vue.config.productionTip = false;
Vue.prototype.$gAxios = gAxios; // 请求对象

/* eslint-disable no-new */
window.vueRoot = new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>',
});





